package com.example.manualManagement.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.manualManagement.entity.Manage;

import com.example.manualManagement.mapper.ManageMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class ManageService {

    @Autowired
    private ManageMapper manageMapper;

    public int insertUser(Manage manage){
        return manageMapper.insert(manage);
    }

    public Manage findByName(String userName) {
        QueryWrapper<Manage> wrapper=new QueryWrapper<>();
        wrapper.eq("userName",userName);

        Manage manage = manageMapper.selectOne(wrapper);
        return manage;
    }
}
